import request from '@/utils/request'



// 查询
export function allList(query) {
  return request({
    url: '/amac/exceptionalData/getList',
    method: 'get',
    params: query
  })
}


// 新增部门
export function addDept(data) {
  return request({
    url: '/amac/exceptionalData',
    method: 'post',
    data: data
  })
}

// 修改部门
export function updateDept(data) {
  return request({
    url: '/amac/exceptionalData',
    method: 'put',
    data: data
  })
}

// 删除
export function delDept(ids) {
  return request({
    url: '/amac/exceptionalData/' + ids,
    method: 'delete'
  })
}

// 还原
export function backDept(ids) {
  return request({
    url: '/amac/exceptionalData/back/' + ids,
    method: 'get'
  })
}

// 确认
export function enterDept(ids) {
  return request({
    url: '/amac/exceptionalData/enter/' + ids,
    method: 'get'
  })
}

// 根据id获取详情
export function detailsForId(ids) {
  return request({
    url: '/amac/exceptionalData/detailsForId/' + ids,
    method: 'get'
  })
}
// 根据id获取图片链接
export function pictureDetails(ids) {
  return request({
    url: '/amac/exceptionalData/pictureDetails/' + ids,
    method: 'get'
  })
}

//产品计费批量查询
export function getListSku(query) {
  return request({
    url: '/amac/exceptionalData/getListSku',
    method: 'get',
    params: query
  })
}
export function getExportSku(data) {
  return request({
    url: '/amac/exceptionData/exportSku',
    method: 'post',
    data: JSON.stringify(data), // 确保数据是 JSON 字符串
    responseType: 'blob',
    headers: {
      'Content-Type': 'application/json'
    }
  })
}



